/**
  EG4Sim project, Anyang Normal University && IMP-CAS
  \class EG4TA0
  \brief the primary target
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2024-07-16
  \date 2024-07-16 last modified
  \copyright Copyright (c) 2023-2024 IMP-CAS with LGPLv3 LICENSE
*/

#include "EG4TA0.h"
#include "G4Tubs.hh"
#include "G4NistManager.hh"
#include "G4LogicalVolume.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4SystemOfUnits.hh"

using CLHEP::pi;

EG4TA0::EG4TA0() : EG4Det(){
  auto nist = G4NistManager::Instance();
  auto Be = nist->BuildMaterialWithNewDensity("GRAPHITE180", "G4_Be",
    1.848*g/cm3);
  // auto C = nist->BuildMaterialWithNewDensity("GRAPHITE180", "G4_GRAPHITE_POROUS",
  //   1.7997839*g/cm3);
  // const double dC = 5*mm; // thickness C
  const double dBe = 10.*mm; // thickness Be
  fLV = new G4LogicalVolume(new G4Tubs("TA0", 0., 25.*mm, dBe/2., 0., 2.*pi), Be, "TA0");
  SetColor(0., 1., 1.);
} // end ctor

EG4TA0::~EG4TA0(){}
